package com.scpii.api.persistence.user;

import java.util.Date;

import org.apache.ibatis.annotations.Param;

import com.scpii.api.domain.user.UserPointHistory;

public interface UserPointHistoryMapper {
	int deleteByPrimaryKey(Long id);

	int insert(UserPointHistory record);

	int insertSelective(UserPointHistory record);

	UserPointHistory selectByPrimaryKey(Long id);

	int updateByPrimaryKeySelective(UserPointHistory record);

	int updateByPrimaryKey(UserPointHistory record);

	/**
	 * @param pointConfigId
	 * @param userId
	 * @param timeIn
	 * @return
	 */
	Integer selectCountByPointConfigIdTimeIn(
			@Param("pointConfigId") Long pointConfigId,
			@Param("userId") Long userId, @Param("timeIn") Date timeIn,
			@Param("now") Date now);
}